Optimal. Leaf size=66 \[ \frac {2 \sqrt {a} c \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a c \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3904, 3887, 321, 203} \[ \frac {2 \sqrt {a} c \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a c \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 321
Rule 3887
Rule 3904
Rubi steps
\begin {align*} \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int \frac {\tan ^2(e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx\right )\\ &=\frac {\left (2 a^2 c\right ) \operatorname {Subst}\left (\int \frac {x^2}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a c \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {(2 a c) \operatorname {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} c \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a c \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 70, normalized size = 1.06 \[ -\frac {2 c \tan \left (\frac {1}{2} (e+f x)\right ) \sqrt {a (\sec (e+f x)+1)} \left (\sqrt {\sec (e+f x)-1}-\tan ^{-1}\left (\sqrt {\sec (e+f x)-1}\right )\right )}{f \sqrt {\sec (e+f x)-1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 234, normalized size = 3.55 \[ \left [\frac {{\left (c \cos \left (f x + e\right ) + c\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, c \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{f \cos \left (f x + e\right ) + f}, -\frac {2 \, {\left ({\left (c \cos \left (f x + e\right ) + c\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + c \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{f \cos \left (f x + e\right ) + f}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.42, size = 115, normalized size = 1.74 \[ \frac {c \sqrt {\frac {a \left (1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}}\, \left (-\sqrt {2}\, \sin \left (f x +e \right ) \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}+2 \cos \left (f x +e \right )-2\right )}{f \sin \left (f x +e \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.84, size = 147, normalized size = 2.23 \[ \frac {\sqrt {a} c \arctan \left ({\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \sin \left (f x + e\right ), {\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \cos \left (f x + e\right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - c \left (\int \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\, dx + \int \left (- \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________